<?php


namespace App\Unit;


use App\Notifications\JpushMsg;
use App\Notifications\JpushNotification;
use App\User;


class UserUnit
{
    public function send($title,$content,$user_id){
        try {
           $jpush= new JpushMsg();
           $jpush->setContent($content);
           $jpush->setTitle($title);
           User::find($user_id)->notify(new JpushNotification($jpush));
        }catch (\Exception $exception){
            return false;
        }
    }
    public function addUser(){

    }
}
